package us.gaaoc.framework.webapp.backingbeans.agent.reports;

import javax.faces.context.FacesContext;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.transaction.annotation.Transactional;

import us.gaaoc.framework.webapp.backingbeans.BaseBackingBean;

public class SystemStatistics extends BaseBackingBean {

	private int caseStat;
	private int personStat;
	private int documentStat;
	private int signatureStat;
	private int filingStat;
	
	private String courtUuid;

	public int getCaseStat() {
		courtUuid = (String) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("courtUuid");
		caseStat = this.getModelFacade().countCaseRecords(courtUuid);
		return caseStat;
	}

	public void setCaseStat(int caseStat) {
		this.caseStat = caseStat;
	}

	public int getPersonStat() {
		personStat = this.getModelFacade().countChildren();
		return personStat;
	}

	public void setPersonStat(int personStat) {
		this.personStat = personStat;
	}

	public int getDocumentStat() {
		documentStat = this.getModelFacade().countDocuments();
		return documentStat;
	}

	public void setDocumentStat(int documentStat) {
		this.documentStat = documentStat;
	}

	public int getSignatureStat() {
		signatureStat = this.getModelFacade().countSignatures();
		return signatureStat;
	}

	public void setSignatureStat(int signatureStat) {
		this.signatureStat = signatureStat;
	}

	public int getFilingStat() {
		filingStat = this.getModelFacade().countFilings(courtUuid);
		return filingStat;
	}

	public void setFilingStat(int filingStat) {
		this.filingStat = filingStat;
	}

	public String back() {
		return "back";
	}
}
